
FROM maven:3.6.3-openjdk-8 AS maven

WORKDIR /tmp

COPY settings.xml /usr/share/maven/conf/

COPY . /tmp/

RUN mvn clean package -Dmaven.test.skip=true

FROM openjdk:8u181-stretch

COPY --from=maven /tmp/target/*.jar app.jar

EXPOSE 80

ENTRYPOINT ["java", "-jar", "app.jar", "--server.port=80"]
